home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / New System Software Extensions / MacODBC SDK 2.0b1 / ODBC Tools / SampleDriver / RESULTS.C < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-13  |  3.0 KB  |  165 lines  |  [TEXT/MPS ]

  1.  
  2.     /*
  3.     ** RESULTS.C - This is the module containing the code for ODBC for
  4.     ** returning results and information about results.
  5.     **
  6.     ** (C) Copyright 1991, 1992 By Microsoft Corp.
  7.     */
  8.  
  9.  
  10. #include "sample.h"
  11.  
  12.  
  13.     //    This returns the number of columns associated with the database
  14.     //    attached to "lpstmt".
  15.  
  16. SQL_PRE_API RETCODE SQL_API
  17. SQLNumResultCols(
  18.     HSTMT       hstmt,
  19.     SWORD  FAR *pccol)
  20. {
  21.     return SQL_SUCCESS;
  22. }
  23.  
  24.  
  25.     //    Return information about the database column the user wants
  26.     //    information about.
  27.  
  28. SQL_PRE_API RETCODE SQL_API
  29. SQLDescribeCol(
  30.     HSTMT       hstmt,
  31.     UWORD       icol,
  32.     UCHAR  FAR *szColName,
  33.     SWORD       cbColNameMax,
  34.     SWORD  FAR *pcbColName,
  35.     SWORD  FAR *pfSqlType,
  36.     UDWORD FAR *pcbColDef,
  37.     SWORD  FAR *pibScale,
  38.     SWORD  FAR *pfNullable)
  39. {
  40.     return SQL_SUCCESS;
  41. }
  42.  
  43.  
  44.     //    Returns result column descriptor information for a result set.
  45.  
  46. SQL_PRE_API RETCODE SQL_API
  47. SQLColAttributes(
  48.     HSTMT       hstmt,
  49.     UWORD       icol,
  50.     UWORD       fDescType,
  51.     PTR         rgbDesc,
  52.     SWORD       cbDescMax,
  53.     SWORD  FAR *pcbDesc,
  54.     SDWORD FAR *pfDesc)
  55. {
  56.     return SQL_SUCCESS;
  57. }
  58.  
  59.  
  60.     //    Associate a user-supplied buffer with a database column.
  61.  
  62. SQL_PRE_API RETCODE SQL_API
  63. SQLBindCol(
  64.     HSTMT       hstmt,
  65.     UWORD       icol,
  66.     SWORD       fCType,
  67.     PTR         rgbValue,
  68.     SDWORD      cbValueMax,
  69.     SDWORD FAR *pcbValue)
  70. {
  71.     return SQL_SUCCESS;
  72. }
  73.  
  74.  
  75.     //    Returns data for bound columns in the current row ("lpstmt->iCursor"),
  76.     //    advances the cursor.
  77.  
  78. SQL_PRE_API RETCODE SQL_API
  79. SQLFetch(
  80.     HSTMT       hstmt)
  81. {
  82.     return SQL_SUCCESS;
  83. }
  84.  
  85.     //  Returns result data for a single column in the current row.
  86.  
  87. SQL_PRE_API RETCODE SQL_API
  88. SQLGetData(
  89.     HSTMT       hstmt,
  90.     UWORD       icol,
  91.     SWORD       fCType,
  92.     PTR         rgbValue,
  93.     SDWORD      cbValueMax,
  94.     SDWORD FAR *pcbValue)
  95. {
  96.     return SQL_SUCCESS;
  97. }
  98.  
  99.  
  100.     //    This determines whether there are more results sets available for
  101.     //  the "lpstmt".
  102.  
  103. SQL_PRE_API RETCODE SQL_API
  104. SQLMoreResults(
  105.     HSTMT       hstmt)
  106. {
  107.     return SQL_SUCCESS;
  108. }
  109.  
  110.  
  111.     //    This returns the number of rows associated with the database
  112.     //    attached to "lpstmt".
  113.  
  114. SQL_PRE_API RETCODE SQL_API
  115. SQLRowCount(
  116.     HSTMT       hstmt,
  117.     SDWORD FAR *pcrow)
  118. {
  119.     return SQL_SUCCESS;
  120. }
  121.  
  122.  
  123.     //    This positions the cursor within a block of data.
  124.  
  125. SQL_PRE_API RETCODE SQL_API
  126. SQLSetPos(
  127.     HSTMT       hstmt,
  128.     UWORD       irow,
  129.     UWORD       fOption,
  130.     UWORD       fLock)
  131. {
  132.     return SQL_SUCCESS;
  133. }
  134.  
  135.  
  136.     //    This fetchs a block of data (rowset).
  137.  
  138. SQL_PRE_API RETCODE SQL_API
  139. SQLExtendedFetch(
  140.     HSTMT       hstmt,
  141.     UWORD       fFetchType,
  142.     SDWORD      irow,
  143.     UDWORD FAR *pcrow,
  144.     UWORD  FAR *rgfRowStatus)
  145. {
  146.     return SQL_SUCCESS;
  147. }
  148.  
  149.  
  150.     //  Returns the next SQL error information.
  151.  
  152. SQL_PRE_API RETCODE SQL_API
  153. SQLError(
  154.     HENV        henv,
  155.     HDBC        hdbc,
  156.     HSTMT       hstmt,
  157.     UCHAR  FAR *szSqlState,
  158.     SDWORD FAR *pfNativeError,
  159.     UCHAR  FAR *szErrorMsg,
  160.     SWORD       cbErrorMsgMax,
  161.     SWORD  FAR *pcbErrorMsg)
  162. {
  163.     return SQL_NO_DATA_FOUND;
  164. }
  165.